const path = require('path')
const CracoLessPlugin = require('craco-less')
const resolve = dir => path.resolve(__dirname,dir)
module.exports = {
  plugins:[
    {
      plugin: CracoLessPlugin
    }
  ],
  webpack:{
    alias: {
      '@': resolve('src')
    }
  },
  //配置代理解决跨域
  devServer: {
    proxy: {
      "/api": {
        target: 'http://192.168.0.105:3000',
        changeOrigin: true,
        pathRewrite: {
          "^/api": ""
        }
      }
    }
  }
};